﻿// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------
extern alias pcl;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using pcl::System.Adaptation;
using pcl::System.Security.Cryptography.Adaptation;

namespace Portable.Security.Cryptography.Adaptation
{
    [TestClass]
    public class ProtectedDataFactoryIntegrationTests
    {
        [TestMethod]
        public void ProbingAdapterResolver_CanResolveProtectedDataFactory()
        {
            var resolver = new ProbingAdapterResolver(assemblyString => typeof(ProtectedDataFactory).Assembly, "Desktop");
            PlatformAdapter.SetResolver(resolver);

            var result = PlatformAdapter.Resolve<IProtectedDataFactory>();

            Assert.IsInstanceOfType(result, typeof(ProtectedDataFactory));
        }
    }
}
